Avoid the pitfalls of Unix/NT client-server applications interoperability

By Daniel Schwartz and Larry Duckworth

Including Windows NT in your distributed client-server or distributed computing future, often integrated with one or more Solaris servers, probably will be inevitable.The question is "when?" not "if?".

When the application will be "partitioned" to operate on several servers, or has high transactions throughput requirements (for "rightsizing" mission-critical applications), several Unix/NT interoperability and portability challenges exist. Release delays, extra development costs, porting problems, interprocess communications (IPC) interoperability complexities and system-level programming burdens are just a few of the after-effects of the technical problems encountered if the wrong Unix-NT applications approaches are used.

The solution is to use a "standardized IPC" approach that avoids these problems and enhances normal results. Companies like GTech and Fidelity Investments have harnessed the powers of NT for mission-critical client-server processing, without the interoperability penalties.

The many benefits of NT's features, plus the de facto standard nature of Microsoft's platforms, will combine to promote NT's use. Owing to the rise of Unix as the recent platform-of-choice for "open" applications, the use of NT will often include interrelationships with Unix. This is especially true if the application is more than simple client-to-single server for decision support or some two-tier processing (e.g. a GUI "fat client" to Sybase or Oracle on a server).

To better understand the potential pitfalls of developing an application that interoperates between Unix and NT, one must only review the well-known limitations inherent in using Named Pipes, sockets and remote procedure calls (RPCs). When developing a Unix and NT application, these limits (versus the stronger standardized IPC approach) are as follows:

Using Named Pipes:

Using sockets:

Using RPCs:

Finally, the intranodal IPC methods of Unix and Windows NT are not portable and are functionally incompatible. Thus, porting intranodal process-to-process components between Unix and NT requires a duplication of programming costs and time requirements.

Additional limits of client-server DBMS approach

Often, some thought is given to developing distributed client-server applications with a database-centric approach. However, several application portability and performance limitations exist versus using a standardized IPC approach. Those database-centric limitations include:

Portability:

Scalability:

Flexibility

Obviously, several important limits exist when using "normal" development methods to build applications that are interoperable (and portable) between Solaris and NT. Using standardized IPC avoids the interoperability and portability pitfalls and harnesses the best of the two operating systems.

Unix/NT interoperability challenges defined

The native IPC mechanisms provided by the Unix and NT operating systems are semantically different from one another, incompatible with one another, and generally resistant to straightforward code portability and interoperability. This chasm poses a difficult challenge for developers who must either interoperate or port applications that are heavily dependent on IPC devices for their full processing potential.

The challenge has become an opportunity for tools developers to "soften the blow" of developing for NT, while continuing to support numerous other operating systems (e.g. Unix, OS/2, VMS, NeXT). Companies have emerged that provide tools for porting GUIs, databases and a variety of shell development tools.

Using standardized IPC tools, semantics are consistent, source-code investment is preserved and functionality is unchanged between platforms. With regard to functionality, there is an additional aspect that must be considered when porting to NT.

While source-code interoperability problems can be approached using familiar code-layering and aliasing tricks, the problems that arise because of the mismatch of critical IPC functionality can be much more difficult to solve. In some cases the disappearance, or dilution, of certain IPC functionality can require an application to be sub-architected for the less-functional environment.

The IPC services found within Windows NT are quite rich in many aspects. However, they vary from Unix in several ways for message queuing, signal synchronization and shared memory.

From the perspective of a developer moving to Windows NT, there is generally one objective to be kept in mind: The less change the better. This rule applies to all aspects of the port, no less so regarding IPC. Thus, it is important to measure how much change is imposed on a developer introducing IPC code interoperable between Unix and NT

The interprocess communications (IPC) services for message queuing, signal synchronization and shared memory within Windows NT and Unix vary in several ways. The developer moving to Windows NT will want to minimize the amount of change required when introducing IPC code that is interoperable between Unix and NT.

Messaging

Messaging is probably the weakest (and, thus, most vulnerable) link in NT's IPC story. NT pipes are arguably inferior when compared with similar functionality on Unix, and to a lesser extent OS/2 and VMS. That's not to say that the NT pipes are ineffective. Rather, from the comparative perspective of a developer, the IPC area of functionality that is most likely to cause consternation is that of porting the messaging functionality needed by the developer's applications.

The following three sections examine three aspects of application messaging that are most likely to be cause for concern for a developer contemplating application migration of NT.

Synchronization

A second form of IPC functionality that is important to developers of complex applications is the set of tools used for synchronization between cooperating processes and threads. Unlike messaging, the topic of interprocess synchronization between processes has not benefited from recent industry hype regarding client-server and object-oriented technology. And, in fact, the number of applications built on messaging far exceeds those that depend exclusively on synchronization primitives.

It is somewhat ironic, then, that it is in this area that Windows NT IPC services are strongest. Below is a brief outline of the nature of NT's synchronization tools, followed by a comparative survey of synchronization tools available in Unix.

Memory-sharing

Shared memory is the granddaddy of all IPC mechanisms, and the basic functionality supported on popular multitasking systems has not changed greatly over the years.

Standardized IPC segments can be used for building such application memory-resident databases without the need for a full DBMS. The advantages of such as approach are that it avoids the large footprint of a DBMS within an otherwise skinny application, and, in most cases, the standardized IPC solution will perform faster, because traditional DBMS data dictionary logic is not necessary.

When developing applications that interoperate between Solaris and NT (and possibly other operating systems such as OS/2, NextStep, ESIX, MIPS-OS, UnixWare, OS400 and Tandem), the standardized IPC abstracts away the differences in message queuing, shared memory and signaling. The best of the combined systems is maintained, versus often being compromised with other approaches.

Additionally, one set of application programming interfaces results in less low-level programming, one code base, locations transparency and cross-platform portability, and interoperability performance enhancements.

Daniel Schwartz is a founder and vice president of Momentum Software Corp. Before founding Momentum, he served four years in the networking systems group at Bell Labs. Larry Duckworth is president and CEO of Momentum Software Corp. From 1985 to 1993, he was president of Intercomputer Communications Corp., which was acquired by DCA. He is also president of the International Message Oriented Middleware Association.

To obtain a white paper that more completely details the interoperability and portability challenges in today's heterogeneous computing environment, contact Momentum at 401 South Van Brunt St., Englewood, N.J., 07631, 800-767-1462.